StartPage = function(mainPage){
	StartPage.superclass.constructor.call(this, {
		id: 'exam_start_page',
		fullscreen: true,
		layout: {type : 'vbox',pack : 'center',align: 'center'},
	    defaults: {layout: {type: 'hbox',pack : 'center',align: 'center'},flex: 1,defaults: {xtype: 'button',flex : 1}},
	    items: [{
			items : [{
				text:'Start', 
				ui:'round',
				handler: function(button, event){
					showMask({message:'Create New Test..', cls : 'waiting-mask'});
					Ext.Ajax.request({
			            url: "/cat/create_exam",
			            params: {
							section_id: userProfile.getSectionID()
			            },
			            success: function(response){
			                json = Ext.util.JSON.decode(response.responseText);
			                if (!json.success) {
			                	Ext.Msg.alert('Error!!', json.message, Ext.emptyFn);
								hideMask();
								return;
			                }
							mainPage.setPIndex('testing_skip');
							mainPage.startCAT();
							userProfile.setTheta(json.data.theta);
							hideMask();
			            },
						failure: function(){
							Ext.Msg.alert('Error!!', 'Network Error!!', Ext.emptyFn);
							hideMask();
						}
			        });
				}
			}]
		}]
	});
};

Ext.extend(StartPage, Ext.Panel, {
	
});